package com.weaver.drools;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

import com.weaver.drools.dao.factory.CommonBaseDaoFactoryBean;
@SpringBootApplication
@EnableJpaRepositories(basePackages = {"com.weaver.drools.*"},
repositoryFactoryBeanClass = CommonBaseDaoFactoryBean.class//指定自己的工厂类
)
@EnableCaching
public class WeaverDroolApplication extends SpringBootServletInitializer{

	public static void main(String[] args) {
		SpringApplication.run(WeaverDroolApplication.class, args);
	}
	@Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WeaverDroolApplication.class);
    }
}
